package co.edu.unal.satacredito.administration.view.brand;

import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import co.edu.unal.satacredito.administration.view.general.AdministrationBean;
import co.edu.unal.satacredito.infrastructure.dto.BrandDTO;
import co.edu.unal.satacredito.mediation.BrandEJBLocal;

@ManagedBean(name = "list_Brand")
public class ListBrand extends AdministrationBean {
	
	private List<BrandDTO> brands;

	@EJB
	BrandEJBLocal brandEJB;
	
	@PostConstruct
	public void init(){
		this.brands = brandEJB.findAllBrands();
	}
	
	public String getAllBrand() {
		return LIST_BRANDS;		
	}
	
	public List<BrandDTO> getBrands(){
		return brands;
	}

}
